public class SellTicket implements Runnable {
    private int ticket = 100;

    @Override
    public void run() {
        while(true){
            if(ticket > 0){
                System.out.println(Thread.currentThread().getName() + " is selling ticket " + ticket + " !");
                ticket--;
            }
        }
    }
}
